<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>归还</title>
  <link rel="stylesheet" href="css/base.css">
  <link rel="stylesheet" href="css/back.css">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1, user-scalable=no">
</head>
<body>
<div class="header-box">
  <p>归还</p>
</div>
<div class="back_title">
  <div class="back_title_box">
    <table></table>
    <p class="backAddress_title">确认要归还以下图书</p>
  </div>
</div>
  <div class="backAddress_box">
    <ul id="back_list" class="backAddress_list">
    <li>
    <div>
    <div><i class='back_act'></i><p>"+value+"</p></div>
    <div class="bott_right">
		<b style="display: none">{{:id}}</b>
		<span>周数：</span> 
		<i class="reduc">-</i> 
		<b class="num">{{:borrowWeeks}}</b> 
		<i class="add">+</i>
		<span>周</span>
	</div>
    </div>
    </li>
    </ul>
  </div>


<div class="backAddress">
  <div class="backAddress_box">
    <ul id="backAddress_list" class="backAddress_list">
    </ul>
  </div>
  <div class="chose_backAddress">
    <a href="javascript:;" id="aa11">取消</a>
    <a href="#" id="submit" class="a_back">确定</a>
  </div>
</div>
</body>
<script id="bookAddress_show_tmpl" type="text/x-jsrender">
<li id="{{:id}}">
<i></i>
<p>{{:placeShortName}}</p>
</li>
</script>

<script src="js/jquery.js"></script><script src="js/jquery.cookie.js"></script>
<script src="js/base.js?v=base.js?v=20180102"></script>
<script src="js/jsrender.js"></script>
<script>
$(document).on("click",'#backAddress_list li>i',function() {
	$("#backAddress_list").find("i").removeClass('back_act');
	$(this).attr('class', 'back_act');
	
});

  $("#aa11").click(function(){
    history.go(-1);
  })
  $("#submit").click(function(){
	  returnBook();
  })
  
//   var ids = getQueryString("ids");
//   var names = getQueryString("names");
//   if(ids == null || ids == ""){
// 	  alert("请先选择要续借的绘本！");
// 	  history.go(-1);
//   }
  
//   var namess = decodeURI(names).split(",");
//   $("#back_list").html("");
//   $.each(namess,function(key, value){
// 	  $("#back_list").append("<li><i class='back_act'></i><p>"+value+"</p></li>");
//   });
  
  


// 归还图书
function returnBook(){
	// 借阅，传入库存id集合
	$(document).on('click', '#jieyue', function() {
		var ids = [];
		var arr = $(".back_active").parents("li");
		arr.each(function(i,itme){
			ids.push($(this).attr("id"));
		});
		window.location.href = "pay.html?ids="+ids.join();
	});
}
  
  
</script>
</html>